package com.itheima.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.model.admin.pojos.OAuthBinding;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * OAuth绑定Mapper
 * 
 * @author itheima
 */
@Mapper
public interface OAuthBindingMapper extends BaseMapper<OAuthBinding> {

    /**
     * 根据OAuth类型和OAuth ID查询绑定信息
     */
    @Select("SELECT * FROM tb_oauth_binding WHERE oauth_type = #{oauthType} AND oauth_id = #{oauthId}")
    OAuthBinding selectByOAuthTypeAndId(@Param("oauthType") String oauthType, 
                                        @Param("oauthId") String oauthId);
}

